
		<div class="box_type02">
			<h2 class="txt">팝업관리</h2>
			<p class="icon"><a href="javascript:void(0);" class="icon_m04">매뉴얼</a></p>
			<form name="frmReg" method="post" action="/chmanager/popupDbjob" enctype="multipart/form-data">
			<input type="hidden" name="dbjob" value="<?php echo $dbjob?>">
			<input type="hidden" name="id" value="<?php echo $popup_id?>">
				<!--[s] 쓰기 -->
				<fieldset class="board_write">
					<legend>팝업관리</legend>
					<table cellspacing="0" summary="팝업관리" class="lines">
						<caption>팝업관리</caption>
						<tr>
							<th scope="row" width="140"><label for="title" class="point">팝업제목</label></th>
							<td>
								<div><input type="text" id="title" name="title" class="ip_i" style="width:584px;" value="<?php echo $title?>" /></div>
							</td>
						</tr>
						<tr>
							<th scope="row"><label for="st_day" class="point">시작일</label></th>
							<td>
								<div>
									<input type="text" id="st_day" name="start_date" class="datepicker ip_i" style="width:148px;" value="<?php echo $start_date?>" />
									<a href="javascript:void(0);" class="btn_calendar">달력보기</a>
									<span class="txt_type01">~</span>
									<input type="text" id="st_day2" name="end_date" class="datepicker ip_i" style="width:148px;" value="<?php echo $end_date?>" />
									<a href="javascript:void(0);" class="btn_calendar">달력보기</a>
								</div>
							</td>
						</tr>
						<tr>
							<th scope="row"><label for="displays" class="point">노출구분</label></th>
							<td>
								<div>
									<a href="javascript:void(0);" class="disBtn"><img src="/theme/<?=$_theme?>/images/common/btn_on_off.gif" alt="on" /></a>
									<!-- 히든 인풋박스에 on off 들어가게 구성되어 있음 -->
									<input type="hidden" id="displays" name="open_yn" value="<?php echo $open_yn?>" />
								</div>
							</td>
						</tr>
						<tr>
							<th scope="row"><p class="point">팝업형태</p></th>
							<td>
								<div>
									<ul class="w20 c_box">
										<li><input type="radio" id="forms" name="layer_yn" value="N" class="ip_c" <?php if($layer_yn=='N'){?>checked<?php }?> /><label for="forms" class="txt_type01">일반팝업창</label></li>
										<li><input type="radio" id="forms2" name="layer_yn" value="Y" class="ip_c" <?php if($layer_yn=='Y'){?>checked<?php }?> /><label for="forms2" class="txt_type01">레이어팝업</label></li>
									</ul>
								</div>
							</td>
						</tr>
						<tr>
							<th scope="row"><p class="point">팝업타입</p></th>
							<td>
								<div>
									<ul class="w20 c_box">
										<!-- <li><input type="radio" id="types" name="popup_style" value="T" class="ip_c" checked="checked" /><label for="types" class="txt_type01">템플릿타입</label></li> -->
										<li><input type="radio" id="types2" name="popup_style" value="I" class="ip_c" <?php if($popup_style=='I'){?>checked<?php }?>/><label for="types2" class="txt_type01">이미지타입</label></li>
										<li><input type="radio" id="types3" name="popup_style" value="E" class="ip_c" <?php if($popup_style=='E'){?>checked<?php }?> /><label for="types3" class="txt_type01">에디터타입</label></li>
									</ul>
								</div>
							</td>
						</tr>
						<tr>
							<th scope="row"></th>
							<td>
								<div class="popup_content">
									<input type="file" id="" name="file1" class="ip_i" style="width:100%;" value="" />
								</div>
								<div class="popup_content">
									<!-- <p class="mb5">
										<select name="" class="ip_s">
											<option value="">명절</option>
										</select>
	
										<select name="" class="ip_s ml6">
											<option value="">송구영신예배</option>
										</select>
									</p> -->
									<textarea id="textarea_id" name="content" rows="" cols="" class="ip_t"><?php echo $popup_content?></textarea>
									<?php echo display_ckeditor($_ckeditor); ?>
								</div>
								
							</td>
						</tr>
						<!--<tr>
							<td>
								<div>
									<input type="text" id="" name="" class="ip_i" style="width:559px;" value="" />
									<a href="javascript:void(0);" class="btn_search">찾아보기</a>
								</div>
							</td>
						</tr>  -->
						<tr>
							<th scope="row"><p class="point">팝업위치</p></th>
							<td>
								<div>
									<ul class="w30 c_box">
										<li><input type="text" id="positions" name="popup_top" class="ip_i" style="width:66px;" value="<?php echo $popup_top?>" /><label for="positions" class="txt_type01 bold">Top</label></li>
										<li><input type="text" id="positions2" name="popup_left" class="ip_i" style="width:66px;" value="<?php echo $popup_left?>" /><label for="positions2" class="txt_type01 bold">Left</label></li>
									</ul>
								</div>
							</td>
						</tr>
						<tr>
							<th scope="row"><label for="sizes" class="point">팝업크기</label></th>
							<td>
								<div>
									<ul class="w30 c_box">
										<li><input type="text" id="sizes" name="popup_width" class="ip_i" style="width:66px;" value="<?php echo $popup_width?>" /><label for="sizes" class="txt_type01 bold">Width</label></li>
										<li><input type="text" id="sizes2" name="popup_height" class="ip_i" style="width:66px;" value="<?php echo $popup_height?>" /><label for="sizes2" class="txt_type01 bold">Height</label></li>
									</ul>
								</div>
							</td>
						</tr>
					</table>
				</fieldset>
				<!--[e] 쓰기 -->
			</form>
			<!-- [s] 버튼 -->
			<ul class="botton_box mt30">
				<li class="center">
					<a href="javascript:frmValid();"><img src="/theme/<?=$_theme?>/images/common/btn_ok.gif" alt="확인" /></a>
					<!--<a href="javascript:void(0);"><img src="/theme/<?=$_theme?>/images/common/btn_modify.gif" alt="수정" /></a>-->
					<a href="javascript:frmDelete();" class="btnDelete"><img src="/theme/<?=$_theme?>/images/common/btn_delete.gif" alt="삭제" /></a> 
					<a href="javascript:history.back();"><img src="/theme/<?=$_theme?>/images/common/btn_cancel.gif" alt="취소" /></a>
				</li>
			</ul>
			<!-- [e] 버튼 -->

			<!--[s] Tip -->
			<dl id="tip" class="mt30">
				<dt>Tip</dt>
				<dd>인터넷익스플로러의 '호환성보기' 기능을 사용중인 접속자에게 자동으로 최신버전 기준으로 사이트를 출력하도록 처리합니다.</dd>
				<dd>코딩방식에 따라 특정 버전의 브라우저에서 사이트가 깨질수 있으니, 충분한 테스트 후 기능을 설정해 주시기 바랍니다.</dd>
			</dl>
			<!--[e] Tip -->
		</div>
		<style type="text/css">
			.popup_content{display:none;}
			a.btnDelete{display:none !important;}
		</style>
		<script type="text/javascript">
		//<![CDATA[
			function frmValid(){
				with(document.frmReg){
					submit();
				}
			}

			function frmDelete(){
				if(!confirm('삭제 하시겠습니까?'))return;
				with(document.frmReg){
					dbjob.value = 'd';
					submit();
				}	 
			}
			
			$.datepicker.setDefaults({
				dateFormat: 'yy-mm-dd'
			});

			$(function(){
				//삭제버튼
				if($("[name=dbjob]").val() == 'u'){ 
					$(".btnDelete").show();
				}
				
				$(".datepicker").datepicker();
				$(".btn_calendar").click(function(){
					var index = $(".btn_calendar").index($(this));
					$('.datepicker').eq(index).datepicker('show');	
				});

				//표시여부
				if($('#displays').val() == 'Y'){
					$('.disBtn img').css('left', '0');
				}else{
					$('.disBtn img').css('left', '-65px');	
				}

				$("[name=popup_style]").each(function(index){
					if($(this).attr("checked")){
						$(".popup_content:eq("+index+")").show();
						return;
					}
				});
				
				$("[name=popup_style]").click(function(){
					var index = $("[name=popup_style]").index($(this));
					$(".popup_content").hide();
					$(".popup_content:eq("+index+")").show();	
				});
			});

		//]]>
		</script>